<template>
  <view :class="`vin-comment-images vin-comment-images--${type}`">
    <!-- videos -->
    <view
      class="vin-comment-images__item vin-comment-images__item--video"
      v-for="(itV, index) in videos"
      :key="itV.id"
      @click="showImages('video', index)"
    >
      <image :src="itV.mainUrl" />
      <view class="vin-comment-images__play"></view>
    </view>
    <!-- images -->
    <template v-for="(itI, index) in images" :key="itI.id">
      <view
        class="vin-comment-images__item vin-comment-images__item--imgbox"
        v-if="(type == 'multi' && videos.length + index < 9) || type != 'multi'"
        @click="showImages('img', index + videos.length)"
      >
        <image :src="itI.smallImgUrl ? itI.smallImgUrl : itI.imgUrl" />

        <view
          class="vin-comment-images__mask"
          v-if="type == 'multi' && totalImages.length > 9 && videos.length + index > 7"
        >
          <span>共 {{ totalImages.length }} 张</span>
          <vin-icon name="right" size="12"></vin-icon>
        </view>
      </view>
    </template>
  </view>
</template>
<script>import s from './index.js';export default s;</script>